home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000091_icon-group-sender _Wed Apr 17 17:36:13 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Wed, 17 Apr 1996 12:46:26 MST
  2. Message-Id: <31751DFD.302F@tees.ac.uk>
  3. Date: Wed, 17 Apr 1996 17:36:13 +0100
  4. From: Hamish Lawson <H.Lawson@tees.ac.uk>
  5. Organization: University of Teesside, School of Computing and Maths
  6. X-Mailer: Mozilla 2.01Gold (Win95; I)
  7. Mime-Version: 1.0
  8. To: icon-group@cs.arizona.edu
  9. Subject: Splitting and joining strings
  10. References: <s16ce499.081@wise.net> <317260B1.7F93@tees.ac.uk>
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14. Status: O
  15.  
  16. Before I rolled my own I thought I'd have a look in the Icon Program Library for a 
  17. couple of procedures I need.
  18.  
  19. The first should split a string on a specified separator, along the lines of 
  20.  
  21.    split("Joe:Sue:Bob:Ann", ":") produces "Joe", "Sue", "Bob", "Ann"
  22.  
  23. The second should join the elements of a list into a string, with each element 
  24. separated by a specified separator, along the lines of:
  25.  
  26.    join(["Joe", "Sue", "Bob", "Ann"], ":") produces "Joe:Sue:Bob:Ann"
  27.  
  28. I couldn't find any such procedures in the IPL. Have I missed them?
  29.  
  30.  
  31. | Hamish Lawson, School of Computing and Mathematics, 
  32. | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA 
  33. | Tel: +44 1642 212695  Fax: +44 1642 342604
  34. | E-mail: H.Lawson@tees.ac.uk
  35.